﻿
using Microsoft.EntityFrameworkCore;

using System.Text.Json;
using System;

using System.Collections.Generic;

using System.Linq;

using Xc.DataAccess.DataBases.Core.Models;
using System.Collections.ObjectModel;
using System.Text.Json.Serialization;
using System.ComponentModel.DataAnnotations;

namespace Xc.DataAccess.DataBase.DeviceInfos.Models
{
    public class DbDeviceInfoBuilder : IDbModelCreater
    {
        public void Create(ModelBuilder modelBuilder)
        {
             modelBuilder.Entity<DeviceInfo>(info =>
            {
               
            });
            modelBuilder.Entity<CommandInfo>(info => 
            {
                info.OwnsOne(p => p.RequestInfo);
                info.OwnsOne(p => p.RespondInfo);
                info.Property(p=>p.CommandName).HasMaxLength(200);
            });
        }
    }
}
